home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 17387 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  2.7 KB

  1. Path: fido.asd.sgi.com!news
  2. From: austern@isolde.mti.sgi.com (Matt Austern)
  3. Newsgroups: comp.lang.java,comp.lang.c++,comp.lang.smalltalk
  4. Subject: Re: Will Java kill C++?
  5. Followup-To: comp.lang.java,comp.lang.c++,comp.lang.smalltalk
  6. Date: 15 Apr 1996 17:42:56 GMT
  7. Organization: SGI
  8. Message-ID: <AUSTERN.96Apr15104256@isolde.mti.sgi.com>
  9. References: <31683229.446B9B3D@bbn.com> <DpJs8I.8tn@research.att.com>
  10.     <4kn3c4$1ggc@piglet.cc.uic.edu> <Dpt0FD.Et4@research.att.com>
  11.     <4ks0c8$jte@piglet.cc.uic.edu>
  12. Reply-To: austern@mti.sgi.com
  13. NNTP-Posting-Host: isolde.mti.sgi.com
  14. In-reply-to: dhanle2@icarus.cc.uic.edu's message of 14 Apr 1996 23:05:44 GMT
  15.  
  16. In article <4ks0c8$jte@piglet.cc.uic.edu> dhanle2@icarus.cc.uic.edu (David James Hanley) writes:
  17.  
  18. > : Correct about what?  That having a name-mangling standard for C++
  19. > : would make C++ libraries easier to handle.  Sorry, but he's wrong,
  20. > : and so are you.
  21. >     Nope. You're the one who is wrong here.  But seeing as you
  22. > replied to my first post about the matter with insults to me, I really
  23. > doubt you are interested in serious exploration of the matter.  
  24.  
  25. I'd think twice before telling Andy flatly that he's wrong about some
  26. basic C++ issue.  There might be a few people who know more about the
  27. language than he does, but there sure aren't many.
  28.  
  29. And in this case, he does happen to be right.  There are a whole lot
  30. of issues to be resolved if you want to link object files from two
  31. compilers: sizes of basic types, direction of stack growth,
  32. representation of the number of arguments passed to a subroutine,
  33. order in which arguments are passed, mechanism for return types,
  34. padding of data structures, mechanism for polymorphic function calls,
  35. initialization of global data, layout of derived classes (especially
  36. in the case of multiple and/or virtual inheritance), representation of
  37. object type, mechanism for linking to dynamic shared libraries,
  38. representation of exceptions, registering objects for destruction upon
  39. stack unwinding, and many, many more.  These issues are the ones I
  40. thought of off the top of my head, which means there are probably ten
  41. times more issues that didn't happen to occur to me just now.
  42.  
  43. Object files from two compilers will never link together just by
  44. accident: it only happens when one or more compiler vendors is
  45. deliberately working for link compatibility.  Usually this is because
  46. there's some implicitly (or explicitly) defined ABI, perhaps defined
  47. by the vendor of the OS that the compilers are running on.
  48.  
  49. C ABIs exist for many (but not all!) popular platforms, including SGI
  50. machines.  C++ ABIs necessarily deal with many more issues, so they're
  51. still in the process of being developed.
  52. -- 
  53. Matt Austern
  54. SGI: MTI Compilers Group
  55. austern@isolde.mti.sgi.com
  56.